﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TipResponsFormat;

namespace CSE445HW5.UserProtected
{
    public partial class TipCalculator_TryIt : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            TipCalculatorService.ServiceClient tip = new TipCalculatorService.ServiceClient();
            double result = tip.CalculateTip(double.Parse(TextBox1.Text), double.Parse(TextBox2.Text), int.Parse(TextBox3.Text));
            results.Text = TipResponse.FormatTheResponse(result, double.Parse(TextBox1.Text), double.Parse(TextBox2.Text), int.Parse(TextBox3.Text));
        }
    }
}